{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "dataframe = pd.read_table('./data/before/20210401.txt', sep='\\t')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = dataframe.loc[range(0, dataframe.shape[0], 500)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['航班号(I170)', '高精度位置报接收时间(I073&I074)', 'NACP', '风向(I220)', '真空速(I151)',\n",
       "       '温度(I220)', '磁航向(I152)', '经纬度(I130)', '飞行上升下降率(I155)', '高精度经纬度(I131)',\n",
       "       '速度报接收时间(I075)', '二次代码(I070)', '高精度速度报接收时间(I075&I076)', '系统接收时间',\n",
       "       '地速(I160)', '几何高度(I140)', 'CAT021发送时间(I077)', '飞行高度(I145)', '航向(I160)',\n",
       "       '延迟时间', '位置报接收时间(I073)'],\n",
       "      dtype='object')"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "df.to_csv('data.csv')"
   ]
  }
 ],
 "metadata": {
  "interpreter": {
   "hash": "82167fe1cdffde6cc128e39118ca25e745f720f0b5c7fa23a7cc231fbc72bcc2"
  },
  "kernelspec": {
   "display_name": "Python 3.8.10 64-bit ('.venv': pipenv)",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.10"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
